#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTime>
#include <QTimer>
#include <QTextCursor>
#include "statistic.h"
#include "LanguageWindow.h"
namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QTime qtime;
    QTimer *timer;
    virtual bool eventFilter(QObject *obj, QEvent *ev);
    bool backspaceEnable;
    static unsigned int errCount;
    static unsigned int symCount;
    static unsigned int speed;
    QTextCursor cur;
private:
    Ui::MainWindow *ui;
    Statistic* dialog1;
    LanguageWindow *dialog2;
    void getFileBeginning();

private slots:
    //void on_action_4_triggered();
    void on_action_2_triggered();
    void on_action_5_triggered();
    void updateTimer();
    void on_action_3_triggered();
    void on_action_triggered();
    void check();
    void stop();
    void setFocusBegin();
    void statistics();
};

#endif // MAINWINDOW_H
